<ion-view title="车辆录入">
  <ion-content overflow-scroll="true" padding="true" class="has-header">
    <form class="list" ng-submit="submit()" novalidate>
      <ion-list>
        <div class="item item-input" name="nickName">
          <span class="input-div">车牌号码</span>
          <input type="text" placeholder="必填" ng-model="data.vehicleNo" required bsy-form-validate="vehicleNoErrorTips">
        </div>
        <ion-toggle toggle-class="toggle-positive" ng-model="data.isInvolvedSomeOne"   ng-checked="false">是否涉及人员信息</ion-toggle>

        <div ng-if="data.isInvolvedSomeOne">
          <div class="item item-divider">
            涉事人员信息
          </div>
          <div class="item item-input" name="usedName">
            <span class="input-div">姓名</span>
            <input type="text" placeholder="" ng-model="data.involedName" ng-required="data.isInvolvedSomeOne"
                   bsy-form-validate="involedNameErrorTips">
          </div>
          <div class="item item-input" name="usedName">
            <span class="input-div">曾用名</span>
            <input type="text" placeholder="" ng-model="data.involveUsedName">
          </div>
          <div class="item item-select">
            <span class="input-div">性别</span>
            <select ng-model="data.involedGener">
              <option value="1">男</option>
            <option value="2">女</option>
            </select>
          </div>
          <div class="item item-input" name="ID">
            <span class="input-div">身份证</span>
            <input type="text" placeholder="必填"
                   ng-maxlength="18"
                   ng-minlength="18"
                   ng-model="data.involvedIdCardNo" ng-required="data.isInvolvedSomeOne"
                   bsy-form-validate="involvedIdCardNoErrorTips">
          </div>
          <div class="item item-input" name="phoneNum">
            <span class="input-div">联系电话</span>
            <input type="tel" placeholder="">
          </div>
          <div class="item item-input" name="residentialAddress">
            <span class="input-div">现住址</span>
            <input type="text" placeholder="必填" ng-model="data.involedlivingaddress" ng-required="data.isInvolvedSomeOne"
                   bsy-form-validate="involedlivingaddressNoErrorTips">
          </div>
          <ion-toggle toggle-class="toggle-positive" ng-model="data.isDriver">是否驾驶人</ion-toggle>

        </div>

        <div class="item item-divider">
          车辆信息
        </div>
        <div class="item item-input" name="collectionCause">
          <span class="input-div">采集原因</span>
          <textarea placeholder="必填" ng-model="data.collectionCasuse" rows="2" bsy-form-validate="collectionCasuseErrorTips" required> </textarea>
        </div>

        <div class="item item-select">
          <span class="input-div">车辆类型</span>
          <select ng-options="vehicleCategory.value as vehicleCategory.label for vehicleCategory in vehicleCategoryList"
                  name="vehicleCategory"
                  bsy-form-validate="vehicleCategoryErrorTips" required
                  ng-model="data.vehicleCategory">
            <option value="">请选择</option>
          </select>
        </div>
        <div class="item item-select">
          <span class="input-div">车辆颜色</span>
          <select ng-options="vehicleColor.value as vehicleColor.label for vehicleColor in vehicleColorList"
                  name="vehicleColor"
                  bsy-form-validate="vehicleColorErrorTips" required
                  ng-model="data.vehicleColor">
            <option value="">请选择</option>
          </select>
        </div>
        <div class="item item-input">
          <span class="input-div">车辆照片</span>
          <div style="width: 80%">
            <ion-photo-grid

              ion-with-remove-button="true"
              ion-with-add-button="true"
              ion-photo-num-per-row="3"
              ion-photo-items="items">

            </ion-photo-grid>

          </div>
        </div>
      </ion-list>
      <button class="button button-positive button-block" check-form="">提交</button>
    </form>
  </ion-content>
</ion-view>
